<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');

function notify_set_messages($message = null)
{
    return $_SESSION['messages'] = $message;
}

function notify_get_messages($clear = true)
{
    if(!isset($_SESSION['messages'])) return '';
    $messages = $_SESSION['messages'];
    unset($_SESSION['messages']);
    return $messages;
}

function notify_error($msg)
{
    return '<div class="error">'.$msg.'</div>';
}

function notify_success($msg)
{
    return '<div class="info">'.$msg.'</div>';
}

function notify_info($msg)
{
    return '<div class="info">'.$msg.'</div>';
}

function notify_atten($msg)
{
    return '<div class="notice">'.$msg.'</div>';
}